<?php /* Smarty version Smarty3Alpha, created on 2008-12-15 14:48:38
         compiled from "D:\web\spo/app/backend/modules/menu/template/menu.tpl" */ ?>
<div id="toolbar" class="text">
<?php  $_smarty_tpl->tpl_vars['ModuleNode'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['nodeKey'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('currentModuleTree')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['nodeKey']->value => $_smarty_tpl->tpl_vars['ModuleNode']->value){
?>

<?php if (is_array($_smarty_tpl->getVariable('ModuleNode')->value['child_nodes'])): ?>  
    <DIV id="<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
" class="main_menu_group">
        <?php echo $_smarty_tpl->getVariable('ModuleNode')->value['name'];?>

    </DIV>
    
    <SCRIPT>
        $("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
").onclick = doPupUp.bindAsEventListener();
        $("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
").onmouseover = mouseOver.bindAsEventListener();
        $("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
").onmouseout = mouseOut.bindAsEventListener();
    </SCRIPT>
    
    <DIV id="<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
_popup" style="position: absolute; left: 0; top: 0; display: none; border: 1px solid black; background-color: #FFFFFF; background-image: url('{$fvConfig->get('dir_web_root')}img/bg_menu.gif'); background-repeat: repeat-y; background-position: left">
        <?php  $_smarty_tpl->tpl_vars['childNode'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['child_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('ModuleNode')->value['child_nodes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['child_key']->value => $_smarty_tpl->tpl_vars['childNode']->value){
?>
        
        <?php if ($_smarty_tpl->getVariable('childNode')->value['image_name']): ?>
            <DIV id="<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
" class="main_menu_child_item" onclick=go("<?php echo $_smarty_tpl->getVariable('childNode')->value['href'];?>
"); go_href="<?php echo $_smarty_tpl->getVariable('childNode')->value['href'];?>
" onmouseover="this.style.backgroundColor = '#FFFFFF';" onmouseout="this.style.backgroundColor = '#ccccdd';">
                <IMG src="<?php echo $_smarty_tpl->getVariable('fvConfig')->value->get('dir_web_root');?>
img/menu_icons/<?php echo $_smarty_tpl->getVariable('childNode')->value['image_name'];?>
" width="16" height="16" border="0" align="absmiddle" style="float: left; margin: 0 7 0 -1;">
                <?php echo $_smarty_tpl->getVariable('childNode')->value['name'];?>

            </DIV>
        <?php else: ?>
            <DIV id="<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
" class="main_menu_child_item_noimage" onclick='go("{$childNode.href}");' go_href="<?php echo $_smarty_tpl->getVariable('childNode')->value['href'];?>
" onmouseover="this.style.backgroundColor = '#FFFFFF';" onmouseout="this.style.backgroundColor = '#ccccdd';">
                <?php echo $_smarty_tpl->getVariable('childNode')->value['name'];?>

            </DIV>
        <?php endif;?>
            
            <SCRIPT>
                var popup_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
 = new PopupMenu();
                
                popup_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
.add('Открыть в новом окне', function(target){
                    window.open(target.getAttribute("go_href"));
                });
                
                popup_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
.bind("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
");

                $("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
").onmouseover = mouseOver.bindAsEventListener();
                $("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
_child_<?php echo $_smarty_tpl->getVariable('child_key')->value;?>
").onmouseout = mouseOut.bindAsEventListener();
            </SCRIPT>
        <?php }} ?>
    </DIV>

    <?php else: ?>
    <DIV id="<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
" class="main_menu_item" onclick="go('{$ModuleNode.href}');">
        <?php echo $_smarty_tpl->getVariable('ModuleNode')->value['name'];?>

    </DIV>

    <SCRIPT>
        $("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
").onmouseover = mouseOver.bindAsEventListener();
        $("<?php echo $_smarty_tpl->getVariable('nodeKey')->value;?>
").onmouseout = mouseOut.bindAsEventListener();
    </SCRIPT>
    
    <?php endif;?>
<?php }} ?>
<div style="clear: both;">
</div>
</div>